<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<style type="text/css">
    * { margin: 0px; padding: 0px; }

    #blank { width: 1024px; height: 160px; }

    #main {
        width: 500px;
        margin: 0 auto;
    }

    .yelloGreen{
        border: 1px solid #000;
        width: 80px;
        background-color: greenyellow;
    }

    .classImportance {
        color: darkorchid;
    }
</style>

<script type="text/javascript">
    window.onload = function myLoadThree() {
        window.document.getElementById("buttonBack").onclick = function back() {
            window.location.href = "/examStudent/grid.do";
        }
    }

</script>

<div id="blank">
</div>
<div id="main">
    <form id="formEdit" action="/examStudent/doEdit.do?id=${examStudent.id}" method="post">
        <table width="500" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>姓名</td>
                <td><input type="text" name="name" value="${examStudent.name}"></td>
                <td class="classImportance">可改动</td>
            </tr>
            <tr>
                <td>学号</td>
                <td><input type="text" name="code" value="${examStudent.code}"></td>
                <td></td>
            </tr>
            <tr>
                <td>性别</td>
                <td>
                    <select id="sex" name="sex">
                        <option value="1" ${examStudent.sex==1 ? "selected":""}>男</option>
                        <option value="0" ${examStudent.sex==0 ? "selected":""}>女</option>
                    </select>
                </td>
                <td class="classImportance">可改动</td>
            </tr>
            <tr>
                <td>出生日期</td>
                <td><input type="text" name="bornDate" value="${examStudent.bornDate}"></td>
                <td class="classImportance">可改动</td>
            </tr>
            <tr>
                <td>所在班级</td>
                <td>
                    <select id="examClassName" name="examClassName">
                        <c:forEach var="examClasses" items="${examClasses}" varStatus="status">
                            <option value="${examClasses.id}" ${examClasses.id==examStudent.examClass.id ? "selected":""}>${examClasses.name}</option>
                        </c:forEach>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr style="height: 60px">
                <td></td>
                <td>
                    <input type="submit" class="yelloGreen" name="submit" value="确定">
                    <input type="reset" class="yelloGreen" name="reset" value="取消">
                </td>
                <td>
                    <input type="button" class="yelloGreen" id="buttonBack" name="buttonBack" value="返回" />
                </td>
            </tr>
        </table>
    </form>
</div>